﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WinLotto
{
    static class Sequence
    {
        public static int[] Create(int minimum, int maximum, int step = 1)
        {
            if (step < 0)
                throw new ArgumentException("step must be larger than zero", "step");

            if (minimum > maximum)
                throw new ArgumentException("minimum must be greater than maximum");

            var length = (maximum - minimum + 1) / step;
            var array = new int[length];
            for (int i = 0; i < length; i++)
                array[i] = minimum + i * step;

            return array;
        }
    }
}
